import request from '@/utils/request'



// 退款审核
export function refundReview_selfOrder(data) {
  return request({
    url: '/biz/selfOrder/refundReview',
    method: 'post',
    data: data
  })
}
// 确认退款
export function refund_selfOrder(data) {
  return request({
    url: '/biz/selfOrder/refund',
    method: 'post',
    data: data,
    params: data
  })
}
// 商家确认发货
export function ConfirmDelivery_selfOrder(data) {
  return request({
    url: '/biz/selfOrder/ConfirmDelivery',
    method: 'post',
    data: data
  })
}
// 查询商品订单
export function list_selfOrder(query) {
  return request({
    url: '/biz/selfOrder/list',
    method: 'post',
    params: query
  })
}

// 查询biz_h门店分类列表
export function listStoreCategory(query) {
  return request({
    url: '/biz/selfStoreCategory/list',
    method: 'get',
    params: query
  })
}

// 查询biz_门店分类详细
export function getStoreCategory(id) {
  return request({
    url: '/biz/selfStoreCategory/' + id,
    method: 'get'
  })
}

// 新增biz_门店分类
export function addStoreCategory(data) {
  return request({
    url: '/biz/selfStoreCategory',
    method: 'post',
    data: data
  })
}

// 修改biz_门店分类
export function updateStoreCategory(data) {
  return request({
    url: '/biz/selfStoreCategory',
    method: 'put',
    data: data
  })
}

// 删除biz_门店分类
export function delStoreCategory(id) {
  return request({
    url: '/biz/selfStoreCategory/' + id,
    method: 'delete'
  })
}


// 查询biz_门店管理列表
export function listStore(query) {
  return request({
    url: '/biz/selfStore/list',
    method: 'get',
    params: query
  })
}

// 查询biz_门店管理详细
export function getStore(id) {
  return request({
    url: '/biz/selfStore/' + id,
    method: 'get'
  })
}

// 新增biz_门店管理
export function addStore(data) {
  return request({
    url: '/biz/selfStore',
    method: 'post',
    data: data
  })
}

// 修改biz_门店管理
export function updateStore(data) {
  return request({
    url: '/biz/selfStore',
    method: 'put',
    data: data
  })
}

// 删除biz_门店管理
export function delStore(id) {
  return request({
    url: '/biz/selfStore/' + id,
    method: 'delete'
  })
}



// 查询biz_商品分类列表
export function listGoodsCategory(query) {
  return request({
    url: '/biz/selfGoodsCategory/tree',
    method: 'get',
    params: query
  })
}

// 查询biz_商品分类详细
export function getGoodsCategory(id) {
  return request({
    url: '/biz/selfGoodsCategory/' + id,
    method: 'get'
  })
}

// 新增biz_商品分类
export function addGoodsCategory(data) {
  return request({
    url: '/biz/selfGoodsCategory',
    method: 'post',
    data: data
  })
}

// 修改biz_商品分类
export function updateGoodsCategory(data) {
  return request({
    url: '/biz/selfGoodsCategory',
    method: 'put',
    data: data
  })
}

// 删除biz_商品分类
export function delGoodsCategory(id) {
  return request({
    url: '/biz/selfGoodsCategory/' + id,
    method: 'delete'
  })
}

// 查询biz_商品管理列表
export function listGoods(query) {
  return request({
    url: '/biz/selfGoods/list',
    method: 'get',
    params: query
  })
}
// 查询biz_商品订单列表
export function listGoodsOrder(query) {
  return request({
    url: '/api/biz/selfOrder/list',
    method: 'get',
    params: query
  })
}

// 查询biz_商品管理详细
export function getGoods(id) {
  return request({
    url: '/biz/selfGoods/' + id,
    method: 'get'
  })
}

// 新增biz_商品管理
export function addGoods(data) {
  return request({
    url: '/biz/selfGoods',
    method: 'post',
    data: data
  })
}
// 上下架
export function shelvesGoods(data) {
  return request({
    url: '/biz/selfGoods/shelves',
    method: 'post',
    data: data,
    params: data
  })
}
// 导出商品管理 
export function exportGoods(data) {
  return request({
    url: '/biz/selfGoods/export',
    method: 'post',
    data: data
  })
}

// 修改biz_商品管理
export function updateGoods(data) {
  return request({
    url: '/biz/selfGoods',
    method: 'put',
    data: data
  })
}

// 删除biz_商品管理
export function delGoods(id) {
  return request({
    url: '/biz/selfGoods/' + id,
    method: 'delete'
  })
}
